package com.douxg.fastCoding.spring.config;

import com.baomidou.mybatisplus.extension.plugins.tenant.TenantHandler;
import net.sf.jsqlparser.expression.Expression;
import net.sf.jsqlparser.expression.LongValue;
import org.springframework.stereotype.Component;

/**
 * @Description
 * @Auther douxg
 * @Date 2021/4/20 10:33
 */
@Component
public class MyTenantLineHandler implements TenantHandler {
    @Override
    public Expression getTenantId(boolean where) {
        return new LongValue(2);
    }

    @Override
    public String getTenantIdColumn() {
        return "TENANT_ID";
    }

    @Override
    public boolean doTableFilter(String tableName) {
        return false;
    }
}
